package com.deep.deepenterpise.common.gas;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author xyz
 * @version 1.0
 * @title DrGpsAuthFactory
 * @description
 * @create 2024/4/19 19:26
 */
@Component
public class DrGasAuthFactory {
    @Resource
    private DrRedisGasAuthHandler drRedisGasAuthHandler;

    public DrGasAuthKey getGpsAuthHandler(DrGasAuthEnum drGpsAuthEnum) {
        if (DrGasAuthEnum.REDIS.compare(drGpsAuthEnum)) {
            return drRedisGasAuthHandler;
        }
        throw new IllegalArgumentException("Invalid authentication task type: " + drGpsAuthEnum.getType());
    }
}
